function delRoleUserDialog(
    {
        roleId,
        userId,
        userName = "",
        callback = Function()

    }
) {
    if (!roleId || !userId) {
        return $.toast("角色ID或用户ID不能为空");
    }

    const $dialogWidget = $.dialog(
        userName ? "是否确定删除角色用户(" + userName + ")" : "是否确定删除该角色用户",
        {
            ok() {
                delRoleUser({
                    roleId,
                    userId
                }, res => {
                    if (res.Code !== 10000) {
                        return $.toast(res.Message);
                    }

                    $dialogWidget.remove();
                    $.toast("删除成功");
                    callback();
                })
            }
        }
    )

    return $dialogWidget;

    function delRoleUser(param, callback = Function()) {
        return $.sApi({
            data: param,
            url: "/api/RoleUser/delRoleUser",
        }, callback)
    }

}